package com.ll.domain.user.base;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ll.base.dto.NameDTO;
import com.ll.dal.po.UserPO;
import com.ll.domain.tenant.enums.AppEnum;
import com.ll.domain.tenant.enums.SystemOSEnum;
import com.ll.domain.user.dto.UserDTO;

import java.util.List;

public interface UserBaseService extends IService<UserPO> {

    Long register(UserDTO userDTO);
    List<Long> batchInit(List<UserDTO> list);
    UserDTO getByDingUserId(String dingUserId);
    List<UserDTO> getByName(NameDTO name);

    default UserDTO getByWechatUIdAndAppId(Long tenantId, AppEnum app, String wechatUserId){
        return this.getByWechatUIdAndAppId(tenantId,  app, wechatUserId,false);
    }
    UserDTO getByWechatUIdAndAppId(Long tenantId, AppEnum app,String wechatUserId,  boolean condition);

    List<UserDTO> getByDingUids(List<String> dingUids);
    void addIntegral(Long id, Integer integral);
    void checkIntegral(List<Long> id, Integer integral);
    void addIntegral(String dingUserId, Integer integral);
    void updateIntegral(UserDTO po, Integer integral);
    UserDTO getById(Long tenantId, Long id, boolean checkNull);
    UserDTO getById(Long id, boolean checkNull);
    List<UserDTO> getByIds(List<Long> ids);
    Long getIntegralRanking(Long tenantId, Long uid);


}
